package com.baor.controller;

import com.baor.service.RoleService;
import com.baor.utils.AjaxResult;
import com.netflix.discovery.converters.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @RequestMapping("/list")
    public AjaxResult<?> list(@RequestBody  Map<String, Object> params) {
       return this.roleService.list(params);
    }
    @RequestMapping("/delete")
    public AjaxResult<?> delete(@RequestBody Map<String,Object> params){
        return this.roleService.delete(params);
    }
    @RequestMapping("/insert")
    public AjaxResult<?> insert(@RequestBody  Map<String,Object> params){
        return this.roleService.insert(params);
    }
    @RequestMapping("/update")
    public AjaxResult<?> update(@RequestBody Map<String,Object> params){
        return this.roleService.update(params);
    }
    @RequestMapping("/selectRole")
    public AjaxResult<?> selectRole(){
        return this.roleService.selectRole();
    }

}
